#pragma once
#include <setjmp.h>
#include "jpeglib.h"
#include "ImageInc.h"

#ifdef __cplusplus
#define export extern "C" __declspec (dllexport)
#else
#define export __declspec (dllexport)
#endif


struct irr_jpeg_error_mgr
{
	struct jpeg_error_mgr pub;
	jmp_buf setjmp_buffer;
};

struct jpeg_image_info
{
	jpeg_image_info()
	{
		dwWidth = 0;
		dwHeight = 0;
		dwColorNum = 0;
		dwByteNum = 0;
	}
	unsigned int dwWidth;
	unsigned int dwHeight;
	unsigned int dwColorNum;
	unsigned int dwByteNum;
};

bool __declspec (dllexport) is_jpeg_data(unsigned char * pBuffer,unsigned int dwBufferSize);
void __declspec (dllexport) jpeg_create(unsigned char * pBuffer, unsigned int pixelByteNum,unsigned char ** ppOut, jpeg_image_info * pInfo);

